package com.example.lemis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.lemis.model.domain.DoorplateAudit;
import com.example.lemis.model.dto.DoorplateApprovalDTO;
import jakarta.validation.constraints.NotNull;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 管理门牌每级审批数据 Mapper 接口
 * </p>
 *
 * @author lxp
 * @since 2025-06-24
 */
public interface DoorplateAuditMapper extends BaseMapper<DoorplateAudit> {

    void insertAudit(@Param("dto") DoorplateApprovalDTO dto,
                     @Param("applyId") Long applyId,
                     @Param("adminId") Long adminId,
                     @Param("level") Long level);

    Long selectCurrentLevelByApplyId(@Param("applyId") @NotNull(message = "id 不能为空") Long applyId);
}
